package com.venusj.springcloud.contoller;

import com.venusj.springcloud.result.CommonResult;
import com.venusj.springcloud.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created By Administrator
 * User: VenusZ
 * Date: on 2020/3/23 22:02
 * Desc:
 */
@RestController
@Slf4j
public class OrderFeignController {

    @Autowired
    private PaymentFeignService paymentFeignService;

    @GetMapping(value = "/consumer/getFeign/{id}")
    public CommonResult getFeign(@PathVariable("id")  Long id) {
        return paymentFeignService.getPaymentById(id);
    }

    @GetMapping(value = "/consumer/feign/timeout")
    public String getFeignTimeout() {
        return paymentFeignService.getFeignTimeout();
    }
}
